package com.example.test.DTO;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Data
@AllArgsConstructor
public class LocationCondition {
    @Size(max = 2)
    private List<Double> biasPosition;
    @Size(max = 4)
    private List<Double> filterBBox;
    private List<String> filterCategories;
    private List<String> filterCountries;
    private String language;
    private Integer maxResult;
    @NotEmpty
    private String text;

    public LocationCondition(String text) {
        this();
        this.text = text;
    }

    public LocationCondition() {
        maxResult = 1;
        filterCountries = new ArrayList<>();
        filterCountries.add("MMR");
        language = "my";
        filterBBox = Arrays.asList(
                new Double[]{95.994562, 16.588168, 96.369135, 17.090022}
        );
    }
}
